<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Decoding管理</title>
<%
	// 权限验证
	if(session.getAttribute("currentMemberShip")==null){
		response.sendRedirect("login.jsp");
		return;
	}
%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">

	function searchDecoding(){
		var deviceNumber = $("#deviceNumber").combobox("getText").replace("请选择前置机号...","");
		/* var startTime=$("#i1").datebox("getValue");
		var endTime=$("#i2").datebox("getValue");
		var IMSI = $("#IMSI").combobox("getText").replace("请选择IMSI...","");
		var MSISDN = $("#MSISDN").combobox("getText").replace("请选择MSISDN...","");
		var CTCS_ID = $("#CTCS_ID").combobox("getText").replace("请选择机车号...",""); */
		 
		//var deviceNumber = $("#deviceNumber").val();
		var startTime=$("#i1").datebox("getValue");
		var endTime=$("#i2").datebox("getValue");
		var IMSI = $("#IMSI").val();
		var MSISDN = $("#MSISDN").val();
		var CTCS_ID = $("#CTCS_ID").val();
		
		
		var kilometerStartLong=$("#kilometerStart").val();
		var kilometerEndLong=$("#kilometerEnd").val();
		startDate = new Date(startTime.replace(new RegExp("-","gm"),"/"));
		endDate = new Date(endTime.replace(new RegExp("-","gm"),"/"));
		var startTimeLong = startDate.getTime();
		var endTimeLong = endDate.getTime();
		 if(startTimeLong-endTimeLong>0){
			 $.messager.alert("系统提示","查询开始时间"+startTime+"不能大于结束时间"+endTime+"！");
			 return;
		 }
		 /* if(endTimeLong-startTimeLong>24*60*60*1000){
			 $.messager.alert("系统提示","查询时间间隔不能大于24小时！");
			 return;
		 } */
		 /* if(endDate.getFullYear()!=startDate.getFullYear()
				 ||(endDate.getMonth()+1)!=(startDate.getMonth()+1)
				 ||endDate.getDate()!=startDate.getDate()){
			 $.messager.alert("系统提示","查询开始时间和结束时间必须在同一天内！");
			 return;
		 } */
		 if(kilometerStartLong-kilometerEndLong>0){
			 $.messager.alert("系统提示","公里标下限值"+kilometerStartLong+"不能大于公里标上限值"+kilometerEndLong+"！");
			 return;
		 }
		 $("#dg").datagrid('load',{
			"deviceNumber":deviceNumber,
			"startTime":startTimeLong,
		 	"endTime":endTimeLong,
		 	"IMSI":IMSI,
		 	"MSISDN":MSISDN,
		 	"CTCS_ID":CTCS_ID,
		 	"kilometerStart":kilometerStartLong,
		 	"kilometerEnd":kilometerEndLong,
		 	"search":'1'
		 });
	}
	
	function openDecodingAddDialog(){
		 $("#dlg").dialog("open").dialog("setTitle","添加Decoding信息");
		 $("#flag").val(1);
		 $("#id").attr("readonly",false);
	}
	
	function openDecodingModifyDialog(){
		 var selectedRows=$("#dg").datagrid("getSelections");
		 if(selectedRows.length!=1){
			 $.messager.alert("系统提示","请选择一条要编辑的数据！");
			 return;
		 }
		 var row=selectedRows[0];
		 $("#dlg").dialog("open").dialog("setTitle","编辑Decoding信息");
		 $("#fm").form("load",row);
		 $("#flag").val(2);
		 $("#id").attr("readonly",true);
	}
	
	function save(){
		$("#fm").form("submit",{
			url:"${pageContext.request.contextPath}/decoding/save.do",
			onSubmit:function(){
				return $(this).form("validate");
			},
			success:function(result){
				var result=eval('('+result+')');
				if(result.success){
					$.messager.alert("系统提示","保存成功！");
					resetValue();
					$("#dlg").dialog("close");
					$("#dg").datagrid("reload");
				}else{
					$.messager.alert("系统提示","保存失败！");
					return;
				}
			}
		 });
	}
	
	function checkData(){
		var flag=$("#flag").val();
		save();
	}
	
	function resetValue(){
		 $("#length").val("");
		 $("#hdlc_id").val("");
		 $("#triggerTime").val("");
		 $("#NID_ENGINE").val("");
		 $("#T_TRAIN").val("");
		 $("#MSISDN").val("");
		 $("#IMSI").val("");
		 $("#CTCS_ID").val("");
		 $("#trainNumber").val("");
		 $("#vicroadNumberd").val("");
		 $("#deviceNumber").val("");
		 $("#portNumber").val("");
		 $("#timeslotNumber").val("");
		 $("#RBCName").val("");
		 $("#RBCNumber").val("");
		 $("#q_DIR").val("");
		 $("#CRCTest").val("");
		 $("#NID_LRBG").val("");
		 $("#q_MPOSITION").val("");
		 $("#speed").val("");
		 $("#signalType").val("");
		 $("#LLayer").val("");
		 $("#TLayer").val("");
		 $("#SLayer").val("");
		 $("#ALayer").val("");
		 $("#UUID").val("");
	}
	
	function closeDialog(){
		 $("#dlg").dialog("close");
		 resetValue();
	}
	
	function deleteDecoding(){
		 var selectedRows=$("#dg").datagrid("getSelections");
		 if(selectedRows.length==0){
			 $.messager.alert("系统提示","请选择要删除的数据！");
			 return;
		 }
		 var strIds=[];
		 for(var i=0;i<selectedRows.length;i++){
			 strIds.push(selectedRows[i].id);
		 }
		 var ids=strIds.join(",");
		 $.messager.confirm("系统提示","您确定要删除这<font color=red>"+selectedRows.length+"</font>条数据吗？",function(r){
			if(r){
				$.post("${pageContext.request.contextPath}/decoding/delete.do",{primaryKeys:ids},function(result){
					if(result.success){
						 $.messager.alert("系统提示","数据已成功删除！");
						 $("#dg").datagrid("reload");
					}else{
						$.messager.alert("系统提示","数据删除失败，请联系系统管理员！");
					}
				},"json");
			} 
		 });
	}
	
	function exportDecodingInCurrentPage(){
		var rows = $("#dg").datagrid("getRows");
		if(rows.length==0){
			 $.messager.alert("系统提示","请先查询出数据！");
			 return;
		 }
		 var strIds=[];
		 for(var i=0;i<rows.length;i++){
			 strIds.push(rows[i].id);
		 }
		 var ids=strIds.join(",");
		 window.open('${pageContext.request.contextPath}/decoding/export.do?ids='+ids+'');
	}
	function exportByTemplateInCurrentPage(){
		var rows = $("#dg").datagrid("getRows");
		var strIds=[];
		 for(var i=0;i<rows.length;i++){
			 strIds.push(rows[i].id);
		 }
		 var ids=strIds.join(",");
		 window.open('${pageContext.request.contextPath}/decoding/exportByTemplate.do?ids='+ids+'');
	}
	
	function exportDecodingInAllPages(){
		 window.open('${pageContext.request.contextPath}/decoding/export.do?ids='+null+'');
	}
	
	function exportByTemplateInAllPages(){
		 window.open('${pageContext.request.contextPath}/decoding/exportByTemplate.do?ids='+null+'');
	}
	
	function openUploadFileDialog(){
		$("#dlg2").dialog('open').dialog('setTitle','批量导入数据');
	}
	
	function downloadTemplate(){
		window.open('template/decodingExportTemplate.xls');
	}
	
	function uploadFile(){
		$("#uploadForm").form("submit",{
			success:function(result){
				var result=eval('('+result+')');
				if(result.errorMsg){
					$.messager.alert("系统提示",result.errorMsg);
				}else{
					$.messager.alert("系统提示","上传成功");
					$("#dlg2").dialog("close");
					$("#dg").datagrid("reload");
				}
			}
		});
	}
	
	function formatDatebox(value) {
		 var datetimeType = "";
		    var date =new Date(parseInt(value));
		    datetimeType = date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()
		    +" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+" "+date.getMilliseconds();
		    return datetimeType;
	}
	
	function formatALayer(value) {
		//从129到159为“车-地无线消息”
		//从2到43为“地-车无线消息”
		if(value=="Message 129."){
			return "Validated Train Data";
		}else if(value=="Message 130."){
			return "Request for Shunting";
		}else if(value=="Message 132."){
			return "MA Request";
		}else if(value=="Message 136."){
			return "Train Position Report";
		}else if(value=="Message 137."){
			return "Request to Shorten MA is granted";
		}else if(value=="Message 138."){
			return "Request to Shorten MA is rejected";
		}else if(value=="Message 146."){
			return "Acknowledgement";
		}else if(value=="Message 147."){
			return "Acknowledgement of Emergency Stop";
		}else if(value=="Message 149."){
			return "Track Ahead Free Granted";
		}else if(value=="Message 150."){
			return "End of Mission";
		}else if(value=="Message 153."){
			return "Radio in-fill request";
		}else if(value=="Message 154."){
			return "No compatible version";
		}else if(value=="Message 155."){
			return " Initiation of a communication session";
		}else if(value=="Message 156."){
			return "Termination of a communication session";
		}else if(value=="Message 157."){
			return "SoM Position Report";
		}else if(value=="Message 159."){
			return "Session established";
		}else if(value=="Message 2."){
			return "SR Authorisation";
		}else if(value=="Message 3."){
			return "Movement Authority";
		}else if(value=="Message 6."){
			return "Recognition of exit from TRIP mode";
		}else if(value=="Message 8."){
			return "Acknowledgement of Train Data";
		}else if(value=="Message 9."){
			return "Request to Shorten MA";
		}else if(value=="Message 15."){
			return "Conditional Emergency Stop";
		}else if(value=="Message 16."){
			return "Unconditional Emergency Stop";
		}else if(value=="Message 18."){
			return "Revocation of Emergency Stop";
		}else if(value=="Message 24."){
			return "General message";
		}else if(value=="Message 27."){
			return "SH Refused";
		}else if(value=="Message 28."){
			return "SH Authorised";
		}else if(value=="Message 32."){
			return "Configuration Determination";
		}else if(value=="Message 33."){
			return "MA with Shifted Location Reference";
		}else if(value=="Message 34."){
			return "Track Ahead Free Request";
		}else if(value=="Message 37."){
			return " In-fill MA";
		}else if(value=="Message 38."){
			return "Initiation of a communication session";
		}else if(value=="Message 39."){
			return "Acknowledgement of termination of a communication session";
		}else if(value=="Message 40."){
			return "Train Rejected";
		}else if(value=="Message 41."){
			return "Train Accepted";
		}else if(value=="Message 43."){
			return "SoM position report confirmed by RBC";
		}else{
			return "";
		}
		
	}
	
	function formatTrainNumber(value) {
		if(value=="0"){
			return "";
		}else{
			return value;
		}
	}
	
	function formatRBCNumber(value) {
		if(value=="0"){
			return "";
		}else{
			return value;
		}
	}
	
	$(function(){
		var p = $('#dg').datagrid('getPager');
	    $(p).pagination({ //设置分页功能栏
	           //分页功能可以通过Pagination的事件调用后台分页功能来实现
	            //layout:['prev','next'],
                layout:['list','sep','first','prev','sep','manual','sep','next','sep','refresh'],
	        	beforePageText:"第",
	            afterPageText:"页",
	            displayMsg:""                  
	    });
	}
	);
</script>
</head>
<body style="margin: 1px">
	
<table id="dg" title="TCH业务解码管理" class="easyui-datagrid"
   fitColumns="fasle" pagination="true" rownumbers="true" pageSize="100" pageList="[100,200,300,400,500]"
   url="${pageContext.request.contextPath}/decoding/list.do" fit="true" toolbar="#tb">
   <thead>
   	<tr>
   		<th field="cb" checkbox="true" align="center"></th>
   		<th field="hdlc_id" width="80" align="center">hdlc_id</th>
   		<th field="startTime" width="80" align="center" formatter="formatDatebox">触发时间</th>
   		<th field="MSISDN" width="80" align="center">MSISDN</th>
   		<th field="IMSI" width="80" align="center">IMSI</th>
   		<th field="CTCS_ID" width="80" align="center">机车号</th>
   		<th field="trainNumber" width="80" align="center" formatter="formatTrainNumber">车次号</th>
   		<th field="vicroadNumber" width="80" align="center">路局号</th>
   		<th field="deviceNumber" width="80" align="center">设备号</th>
   		<th field="portNumber" width="80" align="center">端口号</th>
   		<th field="timeSlot" width="80" align="center">时隙号</th>
   		<th field="RBCName" width="80" align="center">RBC名称</th>
   		<th field="RBCNumber" width="80" align="center" formatter="formatRBCNumber">RBC号码</th>
   		<th field="q_DIR" width="80" align="center">方向</th>
   		<th field="CRCTest" width="80" align="center">CRC校验</th>
   		<th field="NID_LRBG" width="80" align="center">NID_LRBG</th>
   		<th field="q_MPOSITION" width="80" align="center">公里标</th>
   		<th field="speed" width="80" align="center">速度</th>
   		<th field="signalType" width="80" align="center">信令/C3数据类型</th>
   		<th field="LLayer" width="80" align="center">链路层</th>
   		<th field="TLayer" width="80" align="center">传输层</th>
   		<th field="SLayer" width="80" align="center">安全层</th>
   		<th field="ALayer" width="160" align="center" formatter="formatALayer">应用层</th>
   		<!-- UUID信息不需要显示，故在此隐藏 -->
   		<!-- <th field="UUID" width="80" align="center">UUID</th> -->
   	</tr>
   </thead>
 </table>
 <div id="tb">
 	<div>
 	  <%-- <c:if test="${currentMemberShip.group.name=='管理员' }">
 		<a href="javascript:openDecodingAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
 		<a href="javascript:openDecodingModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
 		<a href="javascript:deleteDecoding()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
      </c:if> --%>
 		<a href="javascript:exportDecodingInCurrentPage()" class="easyui-linkbutton" iconCls="icon-save" plain="true">导出当前业务解码</a>
 		<a href="javascript:exportDecodingInAllPages()" class="easyui-linkbutton" iconCls="icon-save" plain="true">导出所有业务解码</a>
 		<!-- <a href="javascript:exportByTemplateInCurrentPage()" class="easyui-linkbutton" iconCls="icon-save" plain="true">用模版导出当前业务解码</a>
 		<a href="javascript:exportByTemplateInAllPages()" class="easyui-linkbutton" iconCls="icon-save" plain="true">用模版导出所有业务解码</a> -->
     <%--  <c:if test="${currentMemberShip.group.name=='管理员' }">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-import" plain="true" onclick="openUploadFileDialog()">用模版批量导入数据</a>
 	  </c:if> --%>
 	</div>
 	<div>
 		<%-- &nbsp;前置机号：&nbsp;<input class="easyui-combobox" size="15" id="deviceNumber" name="deviceNumber" data-options="panelHeight:'130',valueField:'deviceNumber',textField:'deviceNumber',url:'${pageContext.request.contextPath}/decoding/decodingFrontProcessorIdComboList.do'" value="请选择前置机号..." onkeydown="if(event.keyCode==13) searchDecoding()"/>
 		&nbsp;时间：&nbsp;<input type="text" id="i1" size="20" class="easyui-datetimebox" style="width:150px" />&nbsp;至&nbsp;
		<input type="text" id="i2" size="20" class="easyui-datetimebox"  style="width:150px" />
 		&nbsp;IMSI：&nbsp;<input class="easyui-combobox" size="15" id="IMSI" name="IMSI" data-options="panelHeight:'130',valueField:'IMSI',textField:'IMSI',url:'${pageContext.request.contextPath}/decoding/decodingIMSIComboList.do'" value="请选择IMSI..." onkeydown="if(event.keyCode==13) searchDecoding()"/>
		&nbsp;MSISDN：&nbsp;<input class="easyui-combobox" size="15" id="MSISDN" name="MSISDN" data-options="panelHeight:'130',valueField:'MSISDN',textField:'MSISDN',url:'${pageContext.request.contextPath}/decoding/decodingMSISDNComboList.do'" value="请选择MSISDN..." onkeydown="if(event.keyCode==13) searchDecoding()"/>
		&nbsp;机车号：&nbsp;<input class="easyui-combobox" size="15" id="CTCS_ID" name="CTCS_ID" data-options="panelHeight:'130',valueField:'CTCS_ID',textField:'CTCS_ID',url:'${pageContext.request.contextPath}/decoding/decodingCTCS_IDComboList.do'" value="请选择机车号..." onkeydown="if(event.keyCode==13) searchDecoding()"/>
		 --%>
		<!-- &nbsp;前置机号：&nbsp;<input type="text" size="15" id="deviceNumber" name="deviceNumber" onkeydown="if(event.keyCode==13) searchDecoding()"/>
 		 -->
 		 &nbsp;前置机号：&nbsp;<input class="easyui-combobox" size="15" id="deviceNumber" name="deviceNumber" data-options="panelHeight:'130',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/decoding/decodingFrontProcessorIdComboList.do'" value="请选择前置机号..." onkeydown="if(event.keyCode==13) searchDecoding()"/>
 		 &nbsp;时间：&nbsp;<input type="text" id="i1" size="20" class="easyui-datetimebox" style="width:150px" />&nbsp;至&nbsp;
		<input type="text" id="i2" size="20" class="easyui-datetimebox"  style="width:150px" />
 		&nbsp;IMSI：&nbsp;<input type="text" size="15" id="IMSI" name="IMSI" onkeydown="if(event.keyCode==13) searchDecoding()"/>
		&nbsp;MSISDN：&nbsp;<input type="text" size="15" id="MSISDN" name="MSISDN" onkeydown="if(event.keyCode==13) searchDecoding()"/>
		&nbsp;机车号：&nbsp;<input type="text" size="15" id="CTCS_ID" name="CTCS_ID" onkeydown="if(event.keyCode==13) searchDecoding()"/>
		
		
		&nbsp;公里标：&nbsp;<input type="text" id="kilometerStart" size="20" onkeydown="if(event.keyCode==13) searchDecoding()"/>
 		&nbsp;至&nbsp;
		<input type="text" id="kilometerEnd" size="20" onkeydown="if(event.keyCode==13) searchDecoding()"/>
 		<a href="javascript:searchDecoding()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
 	</div>
 </div>
 
 <div id="dlg" class="easyui-dialog" style="width:620px;height:250px;padding: 10px 20px"
   closed="true" buttons="#dlg-buttons">
   
   <form id="fm" method="post">
   	<table cellspacing="8px">
   		<tr>
   			<td>hdlc_id：</td>
   			<td><input type="text" id="hdlc_id" name="hdlc_id" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>triggerTime：</td>
   			<td><input type="text" id="triggerTime" name="triggerTime" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>MSISDN：</td>
   			<td><input type="text" id="MSISDN" name="MSISDN" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>IMSI：</td>
   			<td><input type="text" id="IMSI" name="IMSI" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>engineNumber：</td>
   			<td><input type="text" id="engineNumber" name="engineNumber" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>trainNumber：</td>
   			<td><input type="text" id="trainNumber" name="trainNumber" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>vicroadNumber：</td>
   			<td><input type="text" id="vicroadNumber" name="vicroadNumber" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>deviceNumber：</td>
   			<td><input type="text" id="deviceNumber" name="deviceNumber" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>portNumber：</td>
   			<td><input type="text" id="portNumber" name="portNumber" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>timeslotNumber：</td>
   			<td><input type="text" id="timeslotNumber" name="timeslotNumber" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>RBCName：</td>
   			<td><input type="text" id="RBCName" name="RBCName" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>RBCNumber：</td>
   			<td><input type="text" id="RBCNumber" name="RBCNumber" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>q_DIR：</td>
   			<td><input type="text" id="q_DIR" name="q_DIR" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>CRCTest：</td>
   			<td><input type="text" id="CRCTest" name="CRCTest" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>NID_LRBG：</td>
   			<td><input type="text" id="NID_LRBG" name="NID_LRBG" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>q_MPOSITION：</td>
   			<td><input type="text" id="q_MPOSITION" name="q_MPOSITION" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>speed：</td>
   			<td><input type="text" id="speed" name="speed" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>signalType：</td>
   			<td><input type="text" id="signalType" name="signalType" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>LLayer：</td>
   			<td><input type="lLayer" id="LLayer" name="LLayer" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>TLayer：</td>
   			<td><input type="text" id="TLayer" name="TLayer" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>SLayer：</td>
   			<td><input type="text" id="SLayer" name="SLayer" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>ALayer：</td>
   			<td><input type="text" id="ALayer" name="ALayer" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>UUID：</td>
   			<td><input type="text" id="UUID" name="UUID" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>l2：</td>
   			<td>
   			<input type="hidden" id="flag" name="flag"/>
   			</td>
   		</tr>
   	</table>
   </form>
 </div>
 
 <div id="dlg-buttons">
 	<a href="javascript:checkData()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
 	<a href="javascript:closeDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
 </div>
 
 <div id="dlg2" class="easyui-dialog" style="width:400px;height:180px;padding:10px 20px"
            closed="true" buttons="#dlg-buttons2">
        <form id="uploadForm" action="${pageContext.request.contextPath}/decoding/upload.do" method="post" enctype="multipart/form-data">
        	<table>
        		<tr>
        			<td>下载模版：</td>
        			<td><a href="javascript:void(0)" class="easyui-linkbutton"  onclick="downloadTemplate()">导入模版</a></td>
        		</tr>
        		<tr>
        			<td>上传文件：</td>
        			<td><input type="file" name="decodingUploadFile"></td>
        		</tr>
        	</table>
        </form>
	</div>
    
	<div id="dlg-buttons2">
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="uploadFile()">上传</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg2').dialog('close')">关闭</a>
	</div>
	
	
</body>
</html>